# Contributor: Aiden Grossman <agrossma154@yahoo.com>
# Maintainer: Aiden Grossman <agrossman154@yahoo.com>
pkgname=py3-contourpy
pkgver=1.2.0
pkgrel=0
pkgdesc="Python library for calculating contours in 2D quadrilateral grids Resources"
url="https://github.com/contourpy/contourpy"
arch="all"
license="BSD-3-Clause"
depends="py3-numpy"
makedepends="py3-gpep517 py3-meson-python py3-pybind11-dev python3-dev"
checkdepends="pytest py3-matplotlib py3-wurlitzer"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/contourpy/contourpy/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/contourpy-$pkgver"
options="!check" # circular dependency with matplotlib

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
91084ca659f796fb49f34840fb08a1a8f2a78ce8264668f5729550b1c46f316933c1d76ed87797bf58a059f0cf63e6efc58c92e44c57787fc8ad1ca16a21aa6e  py3-contourpy-1.2.0.tar.gz
"
